//
//  PostJubuVModel.m
//  HiCar
//
//  Created by huachun on 2019/4/16.
//  Copyright © 2019 丁一. All rights reserved.
//

#import "PostJubuVModel.h"
#import "HJonesNetting.h"

@implementation PostJubuVModel

- (instancetype)init:(id)responseObject{
    if (self = [super init]) {
        [SVProgressHUD showWithStatus:@"提交中.."];
        [HJonesNetting JonesNetting_POST:responseObject
                                  andURL:App_Addreport
                              andtimeout:20.0
                                finished:^(NSError * _Nonnull error, NSDictionary * _Nonnull resultDict) {
                                    if (error) {
                                        [SVProgressHUD showErrorWithStatus:@"网络加载失败"];
                                    }else{
                                        if ([[resultDict objectForKey:@"Code"] longLongValue]==1000) {
                                            [SVProgressHUD showSuccessWithStatus:@"我们已收到您的举报内容"];
                                        }else{
                                            [SVProgressHUD showErrorWithStatus:[resultDict objectForKey:@"Message"]];
                                            
                                        }
                                    }
                                }
                              passmanger:^(NSURLSessionDataTask * _Nonnull manger) {
                                  
                              }
                             andprogress:^(NSProgress * _Nonnull CProgress) {
                                 
                             }];
        
    }
    return self;
}

@end
